import numpy as np

a = np.array([[1,2,3],[4,5,6],[7,8,9]])
print("初始化数组的值为:",a)
print("计算数组的平均值",np.mean(a))
print("计算数组水平方向的平均值",np.mean(a,axis=1))
print("计算数组垂直方向的平均值",np.mean(a,axis=0))